package com.zfzs.post.modules.agent.repository;

import com.zfzs.post.modules.agent.domain.PolicyDivided;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

/**
* @author ck
* @date 2019-11-27
*/
public interface PolicyDividedRepository extends JpaRepository<PolicyDivided, Long>, JpaSpecificationExecutor {

    @Query(value = "select * from policy_divided d where d.agent_id = ?1 and channel_id = ?3 and terminal_id = ?2 and names = ?4", nativeQuery = true)
    PolicyDivided findPolicyDivided(Long agentId, Long terminalId, Long channelId,String names);
}